<!-- 公共右上角弹窗组件 -->
<template>
	<view class="head_bg" @touchmove.stop.prevent="">
		<view class="pop_bg_item1 pop_bg_item_left">
			<view class="left_item" v-for="(item, index) in nav_list" :key="index" @tap.stop="changeNav(item)" >
				{{item.title}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			nav_list: Array
		},
		methods: {
			// 将用户所选择的告诉父组件
			changeNav(item) {
				this.$emit('changeNav', item)
			}
		}
	}
</script>

<style>
	/* 头部下拉框 */
	.head_bg {
		position: fixed;
		z-index: 600;
		width: 100%;
		height: 100%;
		background-color: rgba(0, 0, 0, .5);
	}
	.pop_bg_item1 {
		position: absolute;
		right: 20upx;
		margin-top: 20upx;
		width:30%;
		background-color: #ffffff;
		border-radius: 10upx;
	}
	.pop_bg_item1:before {
		content: "";
		position: absolute;
		display: inline-block;
		border-width: 18upx;
		border-style: solid;
		border-color: white transparent transparent transparent;
		transform: rotate(180deg);
		top: -30upx;
	}
	.pop_bg_item_left:before {
		right: 5%;
	}
	
	.left_item {
		display: flex;
		justify-content: center;
		align-items: center;
		position: relative;
		width: 100%;
		font-size: 32upx;
		padding: 15upx 0;
		color: #333333;
	}
</style>
